<!DOCTYPE html>
<html {% block namespace %} {% endblock %}>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>{% block title %}showstop.tv | social television{% endblock %}</title>
        
        {% block stylesheets %}
		<link rel="stylesheet" href="{{ asset('bundles/showstop/css/base.css') }}" type="text/css" media="all" />
		{% endblock %}
		
		{% block javascript %}
			<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" type="text/javascript"></script>
			<script type="text/javascript">
				$(document).ready(function() {
				   $('#form_searchBox').focus(function() {
					  if( $(this).val() == "Find a Show" )
					  	$(this).val( "" );
					});
					$('#form_searchBox').blur(function() {
					  if( $(this).val() == "" )
					  	$(this).val( "Find a Show" );
					});
				 });
			</script>
		{% endblock %}
		
        <link rel="shortcut icon" href="{{ asset('favicon.ico') }}" />
    </head>
    <body>
	
		<div id="wrapper">
			<div id="top-nav">
				<a href="{{ path('ShowStopTelevisionBundle_homepage') }}"><img style="float:left" src="{{ asset('bundles/showstop/img/logo.png') }}" alt="showstop" /></a>
				<div id="searchContainer">
					{% render "ShowStopTelevisionBundle:Search:form" %}
				</div>
				<div style="width: 350px; height: 35px; float: right;">
					<ul id ="nav">
						<li class="current"><a href="{{ path('ShowStopTelevisionBundle_homepage') }}">Shows</a>
							<ul>
								<li><a href="{{ path('_searchAllpage', {'index': 'A'}) }}">View All</a></li>
								<li><a href="{{ path('_upcoming') }}">Upcoming</a></li>
								
							</ul>
						</li>
						{% if is_granted('IS_AUTHENTICATED_FULLY') %}
								<li class="current">
								
								<a href="{{ path('ShowStopTelevisionBundle_homepage') }}">
								
								{% if ( app.user.lastname == '' ) %}
									{{ app.user.email }}
								{% else %}
									{{ app.user.firstname }} {{ app.user.lastname }}
								{% endif %}
								
								
								
								</a>
									<ul>
										{% if is_granted('ROLE_ADMINISTRATOR') %}
										<li><a href="{{ path("_admin") }}">Admin Panel</a></li>
										{% endif %}
										
										<li><a href="{{ path("_profile", { "id": app.user.id }) }}">Update Profile</a></li>
										
										
										{% if app.user.facebookID == '' and app.user.openID == 'N' %}
											<li><a href="{{ path("_password") }}">Change Password</a></li>
										{% endif %}
										<li><a href="{{ path("_favorites") }}">Favorite Shows</a></li>
										<li><a href="{{ path("_notifications_list") }}">Notifications</a></li>
										<li><a href="{{ path("logout") }}">Logout</a></li>
									</ul>
								</li>
							</ul>
						{% else %}
						</ul>
						<div id="navlinks" style="float:right">
							<a href="{{ path("_login") }}">Login</a>
							<span> | </span>
							<a href="{{ path('_register') }}">Register</a>		
						</div>
						{% endif %}
							
						</li>
					</ul>
				</div>
			</div>
			<div class="content">{% block body %}{% endblock %}</div>
			<h4 style="text-align: center; margin-top: -5px">ShowStop &copy; 2011. All Rights Reserved. </h4> 
		</div>
		
     </body>
</html>
